package com.mejlisse.gwt.request;

import org.springframework.roo.addon.gwt.RooGwtMirroredFrom;
import com.mejlisse.server.domain.Comment;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.requestfactory.shared.RecordListRequest;
import com.google.gwt.requestfactory.shared.RecordRequest;
import com.google.gwt.valuestore.shared.PropertyReference;
import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Instance;
import com.mejlisse.gwt.request.CommentRecord;

@RooGwtMirroredFrom(Comment.class)
@Service(Comment.class)
public interface CommentRequest {

    abstract RecordListRequest<com.mejlisse.gwt.request.CommentRecord> findAllComments();

    abstract RecordRequest<com.mejlisse.gwt.request.CommentRecord> findComment(PropertyReference<Long> id);

    abstract RequestObject<java.lang.Long> countComments();

    abstract RecordListRequest<com.mejlisse.gwt.request.CommentRecord> findCommentEntries(int firstResult, int maxResults);

    @Instance
    abstract RequestObject<java.lang.Void> remove(CommentRecord record);

    @Instance
    abstract RequestObject<java.lang.Void> persist(CommentRecord record);
}
